package com.zyiot.lbs;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import com.umeng.analytics.MobclickAgent;

public class ActSplashScreen extends Activity {
	public static String geotable_id;
	public static String sortby;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splashscreen);
		MobclickAgent.updateOnlineConfig(ActSplashScreen.this);
		// 获取在线参数，LBS云中tableid
		geotable_id = MobclickAgent.getConfigParams(ActSplashScreen.this, "geotable_id");
		sortby = MobclickAgent.getConfigParams(ActSplashScreen.this, "sortby");
		// 闪屏的核心代码
		new Handler().postDelayed(new Runnable() {
			@Override
			public void run() {
				
				Intent intent = new Intent(ActSplashScreen.this, MainActivity.class); // 从启动动画ui跳转到主ui
				intent.putExtra("geotable_id", geotable_id);
				intent.putExtra("sortby", sortby);
				startActivity(intent);
				ActSplashScreen.this.finish(); // 结束启动动画界面
			}
		}, 3000); // 启动动画持续3秒钟
	}

	@Override
	public void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
	}

	@Override
	public void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
	}
}